

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using JTC.MiniCommerce.Core;
using JTC.MiniCommerce.Store;

namespace JTC.MiniCommerce.Web.controls {
  public partial class addressdisplay : System.Web.UI.UserControl {

    #region Member Variables

    private Address _address;

    #endregion

    #region Page Events

    /// <summary>
    /// Handles the Load event of the Page control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
    protected void Page_Load(object sender, EventArgs e) {
      try {
        DisplayAddress();
      }
      catch (Exception ex) {
        Logger.Error(typeof(addressdisplay).Name + ".Page_Load", ex);
      }
    }

    #endregion

    #region Methods

    #region Public

    /// <summary>
    /// Displays the address.
    /// </summary>
    public void DisplayAddress() {
      if(_address != null) {
        address.InnerHtml = _address.FullAddress;
      }
    }

    #endregion

    #endregion

    #region Properties

    /// <summary>
    /// Gets or sets the address.
    /// </summary>
    /// <value>The address.</value>
    public Address Address {
      get {
        return _address;
      }
      set {
        _address = value;
      }
    }
	
    #endregion

  }
}